import * as URL from '@/constants/api';
import req from '@/utils/request';

// 二级分类商品列表
export function getSubCategoryGoods(params) {
  return req({
    url: URL.SUB_CATEGORY_GOODS,
    method: 'post',
    data: params,
  }).then((res) => res.data.result);
}

// 二级分类筛选器
export function getSubCategoryFilter(id) {
  return req({
    url: URL.SUB_CATEGORY_FILTER,
    params: {
      id,
    },
  }).then((res) => res.data.result);
}

// 详情
export function getGoodsDetail(id) {
  return req({
    url: URL.GOODS_DETAIL,
    params: {
      id,
    },
  }).then((res) => res.data.result);
}
